<template>
  <div class="p1755852306 ">
    <uv-navbar @leftClick="leftClick" :title="routeQuery.msg ? '' : '支付结果'" bgColor="#ffffff" placeholder
      imgMode="widthFix" />
    <div class="p1755852624">
      <div class="f p1755852451 jcc">
        <uv-icon v-if="routeQuery.type == 'error'" size="160rpx" color="#DE0012" name="close-circle-fill"></uv-icon>
        <uv-icon v-if="routeQuery.type == 'success'" size="160rpx" color="#5FAD3A"
          name="checkmark-circle-fill"></uv-icon>
      </div>
      <div v-if="routeQuery.type == 'error'" class="p1755852436" style="color: #DE0012">取消支付</div>
      <div v-if="routeQuery.type == 'success'" class="p1755852436" style="color: #5FAD3A">{{routeQuery.msg || '支付成功'}}
      </div>
      <div v-if="routeQuery.type == 'success' " class="p1756083022">
        <div class="fz28" v-if="routeQuery.url == '/pages-worker/list'">感谢您对此次服务提出的评价</div>
        <div class="fz28" v-else-if="routeQuery.url == '/pages-merchant/orderManagement'"></div>
        <div v-else>您的订单已支付成功，工作人员正快马加鞭为您处理</div>
      </div>
      <div class="p1756082521" v-if="routeQuery.url != '/pages-worker/list' && routeQuery.id">
        <uv-button @click="orderTap" size="normal" color="#F2F2F2">
          <div style="color: #333" class="fz32">查看订单</div>
        </uv-button>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        routeQuery: {},
        list: []

      }
    },
    onLoad(options) {
      if (options) {
        let routeQuery = JSON.parse(JSON.stringify(options))
        if (routeQuery.url) routeQuery.url = decodeURIComponent(routeQuery.url)
        this.routeQuery = JSON.parse(JSON.stringify(routeQuery))
      }
    },
    methods: {
      orderTap() {
        uni.redirectTo({
          url: '/pages-worker/order?id=' + this.routeQuery.id
        });
      },
      leftClick() {
        if (this.routeQuery.url) {
          uni.navigateBack({ url: this.routeQuery.url });
          return
        }
        uni.reLaunch({
          url: '/pages/worker/index'
        });
      }
    },
  }
</script>


<style lang="scss" scoped>
@import './common.scss';
  .p1756083022 {
    color: #9C9C9D;
    font-size: 28rpx;
    padding-top: 30rpx;
    text-align: center;
  }

  .p1756082521 {
    width: 400rpx;
    margin: 0 auto;
    padding-top: 60rpx;
  }

  .p1755852306 {
    height: 100vh;
    background-color: #ffffff;
    color: #333;
    text-align: center;
    box-sizing: border-box;

    .p1755852624 {
      background-color: #ffffff;
      border-top: 20rpx solid #f5f5f5;
      padding-top: 60rpx;

    }

    .p1755852451 {}

    .p1755852436 {
      padding-top: 30rpx;
      font-size: 36rpx;
    }

  }
</style>